/* 
 * File:   sched.hpp
 * Author: yuri
 *
 * Created on February 7, 2011, 12:18 AM
 */

#ifndef POSIX_WRAPPE_SCHED_HPP_____
#define	POSIX_WRAPPE_SCHED_HPP_____

#include "config.hpp"
#include "time.hpp"
#include <sched.h>

// *****************************************************************************
// * Begin PosixWrap namespace
// *****************************************************************************
BEGIN_PSX_NAMESPACE

class SchedParam
{
  public:
    SchedParam();
    explicit SchedParam(const ::sched_param& sp);
  
    const SchedParam& operator=(const ::sched_param& sp);

    SchedParam& setSsLowPriority(int value);
    int getSsLowPriority() const;

    SchedParam& setSsReplPeriod(const TimeSpec& t);
    const TimeSpec& getSsReplPeriod() const;

    SchedParam& setSsInitBudget(const TimeSpec& t);
    const TimeSpec& getSsInitBudget() const;

    SchedParam& setSsMaxRepl(int value);
    int getSsMaxRepl() const;
    
    const ::sched_param& getSchedParam() const;
    ::sched_param& getSchedParam();

  private:
    ::sched_param data_;
};

// *****************************************************************************
// * End PosixWrap namespace
// *****************************************************************************
END_PSX_NAMESPACE


#endif	//#ifndef POSIX_WRAPPE_SCHED_HPP_____
